package com.hioove.core.model.base.config;

import com.hioove.core.web.mvc.model.RouteSupport;

import java.io.File;
import java.lang.annotation.Annotation;
import java.util.List;
import java.util.Map;

/**
 * 主要用于程序运行中的类的基本信息
 */
public class ClassSupport {
    // 类名
    private String name;
    // 当类文件
    private File file;
    // 当前类 未进行初始化 仅仅加入jvm
    private Class<?> clazz;
    // 类上的注解类信息
    private List<Annotation> annotations;
    // 类的所有父类
    private List<Class<?>> superClazz;
    // 类的所有子类
    private List<Class<?>> subClazz;
    // 类的所有接口
    private List<Class<?>> interfaces;
    // 类的所有方法<k,v> k:方法名+UUID(防止出现重载方法) v:方法包装类
    private Map<String, MethodSupport> methodSupport;
    // 类的所有字段属性<k,v> k:字段名+UUID v:方法包装类
    private Map<String, FieldSupport> fieldSupport;
    // 路由信息 mvc使用
    private List<RouteSupport> routInfors;
    // 真实的实例对象
    private Object instance;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public File getFile() {
        return file;
    }

    public void setFile(File file) {
        this.file = file;
    }

    public Class<?> getClazz() {
        return clazz;
    }

    public void setClazz(Class<?> clazz) {
        this.clazz = clazz;
    }

    public List<Annotation> getAnnotations() {
        return annotations;
    }

    public void setAnnotations(List<Annotation> annotations) {
        this.annotations = annotations;
    }

    public List<Class<?>> getSuperClazz() {
        return superClazz;
    }

    public void setSuperClazz(List<Class<?>> superClazz) {
        this.superClazz = superClazz;
    }

    public List<Class<?>> getSubClazz() {
        return subClazz;
    }

    public void setSubClazz(List<Class<?>> subClazz) {
        this.subClazz = subClazz;
    }

    public List<Class<?>> getInterfaces() {
        return interfaces;
    }

    public void setInterfaces(List<Class<?>> interfaces) {
        this.interfaces = interfaces;
    }

    public Map<String, MethodSupport> getMethodSupport() {
        return methodSupport;
    }

    public void setMethodSupport(Map<String, MethodSupport> methodSupport) {
        this.methodSupport = methodSupport;
    }

    public Map<String, FieldSupport> getFieldSupport() {
        return fieldSupport;
    }

    public void setFieldSupport(Map<String, FieldSupport> fieldSupport) {
        this.fieldSupport = fieldSupport;
    }

    public List<RouteSupport> getRoutInfors() {
        return routInfors;
    }

    public void setRoutInfors(List<RouteSupport> routInfors) {
        this.routInfors = routInfors;
    }

    public Object getInstance() {
        return instance;
    }

    public void setInstance(Object instance) {
        this.instance = instance;
    }
}
